1. Field of the Invention
The present invention relates to a network device in a data network and more particularly to a system and method of providing support for statistical flow of data by randomly sampling packets at an ingress module and an egress module
2. Description of the Related Art
A packet switched network may include one or more network devices, such as a Ethernet switching chip, each of which includes several modules that are used to process information that is transmitted through the device. Specifically, the device includes an ingress module, a Memory Management Unit (MMU) and an egress module. The ingress module includes switching functionality for determining to which destination port a packet should be directed. The MMU is used for storing packet information and performing resource checks. The egress module is used for performing packet modification and for transmitting the packet to at least one appropriate destination port. One of the ports on the device may be a CPU port that enables the device to send and receive information to and from external switching/routing control entities or CPUs.
A current network device may support physical ports and logical/trunk ports, wherein the trunk ports are a set of physical external ports that act as a single link layer port. Ingress and destination ports on the network device may be physical external ports or trunk ports. By logically combining multiple physical ports into a trunk port, the network may provide greater bandwidth for connecting multiple devices. Furthermore, if one port in the trunk fails, information may still be sent between connected devices through other active ports of the trunk. As such, trunk ports also enable the network to provide greater redundancy between connected network devices.
In order to monitor traffic flow between network devices, the network has to statistically monitor packets travelling through the network. There are currently different methods of monitoring traffic flow in the network. For example, packet flows may be monitored at the ingress module or at the egress module of the network. However, these methods may be inaccurate in that some packets monitored at the ingress module may be dropped during processing. Thus, a system is provided to monitor packet flow by randomly sampling packets at the ingress and egress modules.